package com.per.mybootall.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.per.mybootall.dao.UserMapper;
import com.per.mybootall.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class testNew {
    @Autowired
    private UserMapper userMapper;
    public PageInfo<User> tttt(){
        PageHelper.startPage(1,1);
       List<User> list= (List<User>) userMapper.selectAll();
        PageInfo<User> pageInfo = new PageInfo<>(list);
        System.out.println("分页结果："+pageInfo.toString());
        return pageInfo;
    }
}
